Struts 2  Plug - ins
Plug-ins Overview Plug-in includes the software ingredients to enable features that weren’t in original code base. Typically designed to add custom interceptors and results to the framework. Provide a variety of configuration options. Runtime plug-in elements that can be modified are Bean, Constant, Package / Namespace, Interceptor / Result, Exception.
Common Plug-ins Plug-in range from connecting to dependency-injection frameworks to providing hooks into look-and-feel libraries. SiteMesh  Is a web page look-and-feel, layout, and navigation framework. Provides filters for both FreeMarker and Velocity templates. Standard filter chain optionally starts with the ActionContextCleanUp filter, followed by other desired filters. Purpose of ActionContextCleanUp is to provide SiteMesh integration. Contd…..
Common Plug-ins Ex :  Web.xml entries to add SiteMesh filters. <filter> <filter-name>struts-cleanup</filter-name>   <filter-class>   org.apache.struts2.dispatcher.ActionContextCleanUp </filter-class> </filter> <filter> <filter-name>sitemesh</filter-name> <filter-class>   org.apache.struts2.sitemesh.FreeMarkerPageFilter </filter-class> </filter> Contd…..
Common Plug-ins Tiles :   Allows developers to build templates for application user interfaces. Tiles –default package extends struts-default package so extending tiles-default we can inherit all elements from struts-default package. Ex : configure web.xml to use Tiles plug-ins. <context-param><param-name> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG </param-name><param-value>/tiles/myTiles.xml</param-value> </context-param> ... <listener><listener-class> org.apache.struts2.tiles.StrutsTilesListener </listener-class></listener> Contd…..
Common Plug-ins JFreeChart Allows an action to return generated charts and graphs to be included in web page. Ex : Use jfreechart-default package in our xml file. <struts> <package name=&quot;charts“ namespace=&quot;/charts&quot;extends=&quot;strutsdefault , jfreechart-default&quot;> <action name=&quot;chartScreen&quot;> <result>/jsp/chart.jsp</result> </action> <action name=&quot;chart&quot; class=&quot;com.strutsschool.action.CreateChart&quot;> <result type=&quot;chart&quot;> <param name=&quot;width&quot;>400</param> <param name=&quot;height&quot;>300</param> </result> </action> </package> </struts> Contd…..
Internal Component System It builds and configures the framework. Manages the life cycle of the components and wires them together with other components and configuration. Two types of objects that can be registered with the inject framework. Beans Constants
Beans Beans can be any Java object, or termed as  Plain Old Java Object  or  POJO .] They doesn’t have to extend any class, implement any interface, or contain any annotations. It has 4 attributes name, type, alias, scope. If we were writing a plug-in and wanted the plug-in to define its own ObjectFactory then Ex :  <bean type=&quot;com.opensymphony.xwork2.ObjectFactory&quot; alias=&quot;myFactory“ class=&quot;com.mycompany.MyObjectFactory&quot; /> Beans can be register directly with the container by implementing com.opensympony.xwork2.config.ConfigurationProvider interface and specifying your class in web.xml
Constants Simple configuration settings that can be injected into beans. Simple as a name/value pair. Constants defined by the framework can be overridden by plug-ins, and further overridden by application configuration. Constants are loaded in following order. 1.  web.xml init parameters for the Struts filter 2. default.properties in the Struts JAR 3. struts.properties in WEB-INF/classes  4. struts-plugin.xml in each plug-in JAR 5. struts.xml in WEB-INF/classes
Done! Click the  icon at the bottom to proceed!

More Related Content

PPTX
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
TXT
Web.config
PDF
Android stepbystep
PPT
2310 b 02
PDF
Android security
PPT
2310 b 03
PDF
Android ui misc
PDF
Android activity
SugarCon 2010 - Best Practices for Creating Custom Apps in Sugar
Web.config
Android stepbystep
2310 b 02
Android security
2310 b 03
Android ui misc
Android activity

Viewers also liked (20)

PDF
Android activity
PDF
Android search
PPT
2310 b 05
PPT
2310 b 04
PPT
Krazykoder struts2 domain_object_modeldriven
PDF
Android stepbystep
PDF
Android datastorage
PPT
2310 b 01
PPT
2310 b 06
PDF
Android search
PDF
Android location
PDF
Android ui menu
PDF
Android ui adapter
PPT
2310 b 01
PDF
Android contentprovider
PDF
Android graphics
PDF
Android notification
PDF
Android ui dialog
PDF
Android appwidget
PDF
Android datastorage
Android activity
Android search
2310 b 05
2310 b 04
Krazykoder struts2 domain_object_modeldriven
Android stepbystep
Android datastorage
2310 b 01
2310 b 06
Android search
Android location
Android ui menu
Android ui adapter
2310 b 01
Android contentprovider
Android graphics
Android notification
Android ui dialog
Android appwidget
Android datastorage
Ad

Similar to Krazykoder struts2 plugins (20)

PPT
Struts2
PPT
PPT
Struts2.0basic
PPTX
Spring Surf 101
PPT
Introducing Struts 2
PPT
Component and Event-Driven Architectures in PHP
PPT
Struts2 course chapter 2: installation and configuration
PPT
Dan Holevoet, Google
PPT
Strutsjspservlet
PPT
Struts,Jsp,Servlet
PPT
Strutsjspservlet
PPT
Struts2 in a nutshell
PPT
Expanding a tree node
PPT
Facelets
PPT
Presentation Moss 2007 Usman
PPT
Struts Portlet
PPT
Migration testing framework
PPT
Facelets
PPT
WordPress Standardized Loop API
ODP
ActiveWeb: Chicago Java User Group Presentation
Struts2
Struts2.0basic
Spring Surf 101
Introducing Struts 2
Component and Event-Driven Architectures in PHP
Struts2 course chapter 2: installation and configuration
Dan Holevoet, Google
Strutsjspservlet
Struts,Jsp,Servlet
Strutsjspservlet
Struts2 in a nutshell
Expanding a tree node
Facelets
Presentation Moss 2007 Usman
Struts Portlet
Migration testing framework
Facelets
WordPress Standardized Loop API
ActiveWeb: Chicago Java User Group Presentation
Ad

More from Krazy Koder (20)

PPT
2310 b xd
PPT
2310 b xd
PPT
2310 b xd
PPT
2310 b xc
PPT
2310 b xb
PPT
2310 b 17
PPT
2310 b 16
PPT
2310 b 16
PPT
2310 b 15
PPT
2310 b 15
PPT
2310 b 14
PPT
2310 b 13
PPT
2310 b 12
PPT
2310 b 11
PPT
2310 b 10
PPT
2310 b 09
PPT
2310 b 08
PPT
2310 b 08
PPT
2310 b 08
PPT
2310 b 07
2310 b xd
2310 b xd
2310 b xd
2310 b xc
2310 b xb
2310 b 17
2310 b 16
2310 b 16
2310 b 15
2310 b 15
2310 b 14
2310 b 13
2310 b 12
2310 b 11
2310 b 10
2310 b 09
2310 b 08
2310 b 08
2310 b 08
2310 b 07

Krazykoder struts2 plugins

  • 1. Struts 2 Plug - ins
  • 2. Plug-ins Overview Plug-in includes the software ingredients to enable features that weren’t in original code base. Typically designed to add custom interceptors and results to the framework. Provide a variety of configuration options. Runtime plug-in elements that can be modified are Bean, Constant, Package / Namespace, Interceptor / Result, Exception.
  • 3. Common Plug-ins Plug-in range from connecting to dependency-injection frameworks to providing hooks into look-and-feel libraries. SiteMesh Is a web page look-and-feel, layout, and navigation framework. Provides filters for both FreeMarker and Velocity templates. Standard filter chain optionally starts with the ActionContextCleanUp filter, followed by other desired filters. Purpose of ActionContextCleanUp is to provide SiteMesh integration. Contd…..
  • 4. Common Plug-ins Ex : Web.xml entries to add SiteMesh filters. <filter> <filter-name>struts-cleanup</filter-name> <filter-class> org.apache.struts2.dispatcher.ActionContextCleanUp </filter-class> </filter> <filter> <filter-name>sitemesh</filter-name> <filter-class> org.apache.struts2.sitemesh.FreeMarkerPageFilter </filter-class> </filter> Contd…..
  • 5. Common Plug-ins Tiles : Allows developers to build templates for application user interfaces. Tiles –default package extends struts-default package so extending tiles-default we can inherit all elements from struts-default package. Ex : configure web.xml to use Tiles plug-ins. <context-param><param-name> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG </param-name><param-value>/tiles/myTiles.xml</param-value> </context-param> ... <listener><listener-class> org.apache.struts2.tiles.StrutsTilesListener </listener-class></listener> Contd…..
  • 6. Common Plug-ins JFreeChart Allows an action to return generated charts and graphs to be included in web page. Ex : Use jfreechart-default package in our xml file. <struts> <package name=&quot;charts“ namespace=&quot;/charts&quot;extends=&quot;strutsdefault , jfreechart-default&quot;> <action name=&quot;chartScreen&quot;> <result>/jsp/chart.jsp</result> </action> <action name=&quot;chart&quot; class=&quot;com.strutsschool.action.CreateChart&quot;> <result type=&quot;chart&quot;> <param name=&quot;width&quot;>400</param> <param name=&quot;height&quot;>300</param> </result> </action> </package> </struts> Contd…..
  • 7. Internal Component System It builds and configures the framework. Manages the life cycle of the components and wires them together with other components and configuration. Two types of objects that can be registered with the inject framework. Beans Constants
  • 8. Beans Beans can be any Java object, or termed as Plain Old Java Object or POJO .] They doesn’t have to extend any class, implement any interface, or contain any annotations. It has 4 attributes name, type, alias, scope. If we were writing a plug-in and wanted the plug-in to define its own ObjectFactory then Ex : <bean type=&quot;com.opensymphony.xwork2.ObjectFactory&quot; alias=&quot;myFactory“ class=&quot;com.mycompany.MyObjectFactory&quot; /> Beans can be register directly with the container by implementing com.opensympony.xwork2.config.ConfigurationProvider interface and specifying your class in web.xml
  • 9. Constants Simple configuration settings that can be injected into beans. Simple as a name/value pair. Constants defined by the framework can be overridden by plug-ins, and further overridden by application configuration. Constants are loaded in following order. 1. web.xml init parameters for the Struts filter 2. default.properties in the Struts JAR 3. struts.properties in WEB-INF/classes 4. struts-plugin.xml in each plug-in JAR 5. struts.xml in WEB-INF/classes
  • 10. Done! Click the icon at the bottom to proceed!